<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DOM</title>

</head>
<body>
<img id="light" src="5G.jpg">
<h1 id="title">悔创阿里杰克马</h1>



<script>
    //通过id获取元素对象
    // var light = document.getElementById("light");
    // alert("换图！")
    // light.src="Champion.jpg"

    var title = document.getElementById("title");
    //2.修改内容
    alert("change")
    title.innerHTML="不知妻美刘强东"


</script>
</body>
</html>